Skip to content

fix(codex-proxy): meaningful fallback for message-less turn.failed + pin string/message-less shapes (#694) - #3183

Merged
dezren39 merged 1 commit into
mainfrom
queue/4597-694-codex-inband
Oct 31, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/4597-694-codex-inband

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Fixes #694 (triage task 1069 confirmed on main; queue task 4597).

What

  1. Message-less in-band fallback: when a turn.failed event carries no usable message (error absent, null, or {}) and the run exits 0 with no stderr, the failure detail was the self-contradictory codex exec exited with code 0. The close handler's fallback now yields codex turn failed (turn.failed event carried no error message) for exactly that case (in-band failure seen + exit 0). Non-zero-exit and signal fallbacks are byte-unchanged, and a present stderr line still outranks the fallback.
  2. Tests pin the untested parser shapes: new stub modes INBANDSTR (bare-string error), INBANDNONE (no error), INBANDOBJ (error: {}), exercised on both transports via the existing assertFailure helper, plus an explicit assertion that the message-less detail does not match /exited with code 0/.
  3. Stub isolation: findCodexBinary now honours CODEX_PROXY_CODEX_BIN first, and startProxy pins it to the test stub — a host-installed codex at /run/current-system/sw/bin/codex can no longer shadow the stub (the same host-shadowing class as agy-proxy).

Test evidence (laptop)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…pin string/message-less shapes (#694)

Message-less turn.failed on an exit-0 run now reports codex turn failed (turn.failed event carried no error message) instead of the self-contradictory codex exec exited with code 0; nonzero/signal diagnostics unchanged. Tests gain INBANDSTR/INBANDNONE/INBANDOBJ stub modes covering both transports, and startProxy pins the stub via a new CODEX_PROXY_CODEX_BIN env seam so a host-installed codex cannot shadow it.
@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 18:37
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb9daaae-d8ee-403d-939a-647e702d6c30
Commits

Reviewing files that changed from the base of the PR and between 99ae033 and 7f8664b.

Files selected for processing: 2
  • bin/codex-proxy.mjs
  • bin/codex-proxy.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T18:39:18.850259Z 7f8664b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant